<style>
    .table {
        width: 100% !important;
        max-width: 100%;
        margin-bottom: 18px;
    }

    /* 选项卡样式 */
    .nav-tabs {
        border-bottom: 1px solid #ddd;
        margin-bottom: 20px;
    }

    .nav-tabs>li {
        float: left;
        margin-bottom: -1px;
    }

    .nav-tabs>li>a {
        margin-right: 2px;
        line-height: 1.42857143;
        border: 1px solid transparent;
        border-radius: 4px 4px 0 0;
        padding: 10px 15px;
    }

    .nav-tabs>li>a:hover {
        border-color: #eee #eee #ddd;
    }

    .nav-tabs>li.active>a,
    .nav-tabs>li.active>a:hover,
    .nav-tabs>li.active>a:focus {
        color: #555;
        cursor: default;
        background-color: #fff;
        border: 1px solid #ddd;
        border-bottom-color: transparent;
    }

    .tab-content {
        padding: 20px;
        border: 1px solid #ddd;
        border-top: none;
        background-color: #fff;
        margin-top: -20px;
    }

    table.table-bordered tr td {
        height: 35px;
        line-height: 35px;
        padding: 0 5px;
    }
</style>
<link href="_/assets/css/btn-switcher.css" rel="stylesheet">
<style>
    .offset-xs-2 {
        margin-left: 16.66666667%;
    }
</style>
<style>
    .nav-tabs {
        margin-bottom: 20px;
    }

    .tab-content {
        border: 1px solid #ddd;
        border-top: none;
        padding: 20px;
        background-color: #fff;
    }

    .panel {
        margin-bottom: 0;
    }

    .table th,
    .table td {
        text-align: center;
        vertical-align: middle;
    }

    .stage-panel {
        margin-bottom: 15px;
    }

    .stage-panel .panel-heading {
        background-color: #f8f9fa;
        border-bottom: 1px solid #dee2e6;
    }

    .stage-panel .panel-title {
        font-size: 14px;
        font-weight: bold;
        color: #495057;
    }

    .stage-panel .form-group {
        margin-bottom: 10px;
    }

    .stage-panel .form-group:last-child {
        margin-bottom: 0;
    }

    .stage-panel .control-label {
        font-size: 12px;
        height: 35px;
        line-height: 35px;
        padding: 0 5px;
    }
</style>
<!-- 移除了原来的script标签和内联JavaScript代码 -->

<form id="edit-form" class="form-horizontal" style="position:relative;background: #fff" role="form"
    data-toggle="validator" method="POST" action="">
    <input type="hidden" id="apply_id" name="apply_id" value="{$apply_id}" />
    <div class="panel-body">
        <!-- 选项卡导航 -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active">
                <a href="#basic-info" aria-controls="basic-info" role="tab" data-toggle="tab">基本信息</a>
            </li>
            <li role="presentation">
                <a href="#project-detail" aria-controls="project-detail" role="tab" data-toggle="tab">项目详情</a>
            </li>
            <li role="presentation">
                <a href="#class-info" aria-controls="class-info" role="tab" data-toggle="tab">班级情况</a>
            </li>
            <li role="presentation">
                <a href="#student-detail" aria-controls="student-detail" role="tab" data-toggle="tab"
                    id="student-detail-tab">报名学员详情</a>
            </li>
            <li role="presentation">
                <a href="#registration-info" aria-controls="registration-info" role="tab" data-toggle="tab">报名情况</a>
            </li>
            <li role="presentation">
                <a href="#registration-summary" aria-controls="registration-summary" role="tab"
                    data-toggle="tab">报名情况汇总</a>
            </li>
            <li role="presentation">
                <a href="#pre-registration-map" aria-controls="pre-registration-map" role="tab"
                    data-toggle="tab">预报名地理位置分布图</a>
            </li>
        </ul>



        <!-- 选项卡内容 -->
        <div class="tab-content">
            <!-- 基本信息 -->
            <div role="tabpanel" class="tab-pane fade in active" id="basic-info" style="padding-top: 30px;">
                <!-- 原有所有表单内容 -->
                <input TYPE="hidden" id="row" NAME="data" VALUE='{$row|json_encode|htmlentities}' />
                <input type="hidden" id="id" name="row[id]" value='{$row.id}' />


                <div class="form-group">
                    <label for="c-title" class="control-label col-xs-12 col-sm-2">报名项目名称:</label>
                    <div class="col-xs-12 col-sm-8" id="div-title">
                        <input type="text" id="c-title" name="row[title]" value="{$row.title}" class="form-control"
                            title="title" placeholder="" data-rule="" data-tip="报名项目名称" />
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">课程表项目名称:</label>
                    <div class="col-xs-12 col-sm-8">
                        <select name="row[table_id]" id="c-table_id" class="form-control" data-default="{$row.table_id}">
                            <option value="">请选择课程表</option>
                        </select>
                        <select name="row[publicwelfare_id]" id="c-publicwelfare_id" class="form-control">
                            <option value="">请选择课程表</option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-school_id" class="control-label col-xs-12 col-sm-2">学校:</label>
                    <div class="col-xs-12 col-sm-8" id="div-school_id">
                        <select name="row[school_id]" id="c-school_id" class="form-control">
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-apply_type" class="control-label col-xs-12 col-sm-2">报名类型:</label>
                    <div class="col-xs-12 col-sm-8" id="div-apply_type">
                        <label for="row[apply_type]-0">
                            <input id="row[apply_type]-0" name="row[apply_type]" type="radio" value="0" {if
                                $row["apply_type"]=="0" }checked{/if} /> 预报名
                        </label>
                        <label for="row[apply_type]-1">
                            <input id="row[apply_type]-1" name="row[apply_type]" type="radio" value="1" {if
                                $row["apply_type"]=="1" }checked{/if} /> 报名缴费
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">课堂类型:</label>
                    <div class="col-xs-12 col-sm-8" id="div-table_type">
                        <label for="row[table_type]-1">
                            <input id="row[table_type]-1" name="row[table_type]" type="radio" value="1" {if
                                $row["table_type"]=="1" }checked{/if} /> 学校
                        </label>
                        <label for="row[table_type]-2" style="margin-left:10px;">
                            <input id="row[table_type]-2" name="row[table_type]" type="radio" value="2" {if
                                $row["table_type"]=="2" }checked{/if} /> 社区
                        </label>
                    </div>
                </div>

                <div class="form-group" id="course-type-group"
                    style="display: {if $row['apply_type']=='1'}block{else}none{/if};">
                    <label class="control-label col-xs-12 col-sm-2">课程类型:</label>
                    <div class="col-xs-12 col-sm-8" id="div-course_type">
                        <label for="row[course_type]-1">
                            <input id="row[course_type]-1" name="row[course_type]" type="radio" value="1" {if
                                $row["course_type"]=="1" }checked{/if} /> 课程
                        </label>
                        <label for="row[course_type]-2">
                            <input id="row[course_type]-2" name="row[course_type]" type="radio" value="2" {if
                                $row["course_type"]=="2" }checked{/if} /> 活动
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-enable_registration_conditions" class="control-label col-xs-12 col-sm-2">报名条件:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_registration_conditions">
                        <input id="c-enable_registration_conditions" name="row[enable_registration_conditions]"
                            type="hidden" value="{$row.enable_registration_conditions|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.enable_registration_conditions == 1}active{else}text-gray{/if}"
                                data-input-id="c-enable_registration_conditions" data-yes="1" data-no="0">
                                <i
                                    class="fa fa-toggle-on text-success fa-2x {if $row.enable_registration_conditions != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="registration-conditions-settings"
                    style="display: {if $row['enable_registration_conditions']=='1'}block{else}none{/if};">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">报名条件设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">男性年龄要求:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="row">
                                            <div class="col-xs-5">
                                                <input type="number" name="row[male_age_min]"
                                                    value="{$row.male_age_min|default=''}" class="form-control"
                                                    placeholder="最小年龄" min="0" max="120" />
                                            </div>
                                            <div class="col-xs-2 text-center" style="line-height: 34px;">至</div>
                                            <div class="col-xs-5">
                                                <input type="number" name="row[male_age_max]"
                                                    value="{$row.male_age_max|default=''}" class="form-control"
                                                    placeholder="最大年龄" min="0" max="120" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">女性年龄要求:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="row">
                                            <div class="col-xs-5">
                                                <input type="number" name="row[female_age_min]"
                                                    value="{$row.female_age_min|default=''}" class="form-control"
                                                    placeholder="最小年龄" min="0" max="120" />
                                            </div>
                                            <div class="col-xs-2 text-center" style="line-height: 34px;">至</div>
                                            <div class="col-xs-5">
                                                <input type="number" name="row[female_age_max]"
                                                    value="{$row.female_age_max|default=''}" class="form-control"
                                                    placeholder="最大年龄" min="0" max="120" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">其他条件:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <textarea name="row[other_conditions]" class="form-control" rows="3"
                                            placeholder="请输入其他报名条件要求">{$row.other_conditions|default=''}</textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 报名须知设置 -->
                <div class="form-group">
                    <label for="c-enable_terms_agreement" class="control-label col-xs-12 col-sm-2">报名须知:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_terms_agreement">
                        <input id="c-enable_terms_agreement" name="row[enable_terms_agreement]" type="hidden"
                            value="{$row.enable_terms_agreement|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.enable_terms_agreement == 1}active{else}text-gray{/if}"
                                data-input-id="c-enable_terms_agreement" data-yes="1" data-no="0">
                                <i
                                    class="fa fa-toggle-on text-success fa-2x {if $row.enable_terms_agreement != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="terms-agreement-settings"
                    style="display: {if $row['enable_terms_agreement']=='1'}block{else}none{/if};">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">《报名须知》设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">主题:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[terms_title]"
                                            value="{$row.terms_title|default='报名须知'}" class="form-control"
                                            placeholder="请输入报名须知主题，如：报名须知、注意事项等" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">正文:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <textarea name="row[terms_content]" class="form-control editor" rows="8"
                                            placeholder="请输入报名须知的详细内容，支持富文本格式">{$row.terms_content|default=''}</textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-xs-12 col-sm-8 col-sm-offset-3">
                                        <div class="help-block">
                                            <small class="text-muted">开启后用户报名时需要勾选"我已阅读并同意《报名须知》</small>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_staged" class="control-label col-xs-12 col-sm-2">分阶段报名:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_staged">
                        <input id="c-is_staged" name="row[is_staged]" type="hidden" value="{$row.is_staged|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.is_staged == 1}active{else}text-gray{/if}"
                                data-input-id="c-is_staged" data-yes="1" data-no="0">
                                <i
                                    class="fa fa-toggle-on text-success fa-2x {if $row.is_staged != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">是</div>
                                <div data-favisible="switch=0" class="text-gray">否</div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 添加的分阶段报名信息 -->
                <div class="form-group staged-registration" id="staged-registration-info"
                    style="display: {if $row['is_staged']=='1'}block{else}none{/if};">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <!-- 第一阶段 -->
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">第一阶段</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名开始时间:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[stage][1][start_time]"
                                            class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                                            data-use-current="true" value="{$row.stage1_start_time|default=''}" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名结束时间:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[stage][1][end_time]"
                                            class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                                            data-use-current="true" value="{$row.stage1_end_time|default=''}" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名对象:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <select name="row[stage][1][target]" class="form-control">
                                            <option value="1" {if $row['stage1_target']=='1' }selected{/if}>仅预报名人群
                                            </option>
                                            <option value="2" {if $row['stage1_target']=='2' }selected{/if}>不确定人群
                                            </option>
                                            <option value="3" {if $row['stage1_target']=='3' }selected{/if}>班级人群
                                            </option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 第二阶段 -->
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">第二阶段</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名开始时间:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[stage][2][start_time]"
                                            class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                                            data-use-current="true" value="{$row.stage2_start_time|default=''}" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名结束时间:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[stage][2][end_time]"
                                            class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                                            data-use-current="true" value="{$row.stage2_end_time|default=''}" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名对象:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <select name="row[stage][2][target]" class="form-control">
                                            <option value="1" {if $row['stage2_target']=='1' }selected{/if}>仅预报名人群
                                            </option>
                                            <option value="2" {if $row['stage2_target']=='2' }selected{/if}>不确定人群
                                            </option>
                                            <option value="3" {if $row['stage2_target']=='3' }selected{/if}>班级人群
                                            </option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 分阶段报名信息结束 -->

                <!-- 报名数量限制设置 -->
                <div class="form-group">
                    <label for="c-enable_quantity_limit" class="control-label col-xs-12 col-sm-2">报名数量限制:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_quantity_limit">
                        <input id="c-enable_quantity_limit" name="row[enable_quantity_limit]" type="hidden"
                            value="{$row.enable_quantity_limit|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.enable_quantity_limit == 1}active{else}text-gray{/if}"
                                data-input-id="c-enable_quantity_limit" data-yes="1" data-no="0">
                                <i
                                    class="fa fa-toggle-on text-success fa-2x {if $row.enable_quantity_limit != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="quantity-limit-settings"
                    style="display: {if $row['enable_quantity_limit']=='1'}block{else}none{/if};">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">课程报名数量限制设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">每人最多可报课程数:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="input-group">
                                            <input type="number" name="row[max_courses_per_person]"
                                                value="{$row.max_courses_per_person|default=''}" class="form-control"
                                                placeholder="请输入数字，留空表示无限制" min="1" max="999" />
                                            <span class="input-group-addon">门课程</span>
                                        </div>
                                        <div class="help-block">
                                            <small class="text-muted">设置每个用户最多可以报名多少门课程，留空表示无限制</small>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 报名表开启设置 -->
                <div class="form-group">
                    <label for="c-enable_registration_form" class="control-label col-xs-12 col-sm-2">报名表开启:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_registration_form">
                        <input id="c-enable_registration_form" name="row[enable_registration_form]" type="hidden"
                            value="{$row.enable_registration_form|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.enable_registration_form == 1}active{else}text-gray{/if}"
                                data-input-id="c-enable_registration_form" data-yes="1" data-no="0">
                                <i
                                    class="fa fa-toggle-on text-success fa-2x {if $row.enable_registration_form != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="registration-form-settings"
                    style="display: {if $row['enable_registration_form']=='1'}block{else}none{/if};">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">报名表设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">报名表标题:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[form_title]" value="{$row.form_title|default=''}"
                                            class="form-control" placeholder="请输入报名表标题" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">表单描述:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <textarea name="row[form_description]" class="form-control" rows="3"
                                            placeholder="请输入报名表描述">{$row.form_description|default=''}</textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">必填字段:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        {php}
                                        $required_fields = [];
                                        if (!empty($row['required_fields'])) {
                                        $required_fields = json_decode($row['required_fields'], true);
                                        }
                                        {/php}
                                        <div class="panel panel-default" style="margin-bottom: 0;">
                                            <div class="panel-body" style="padding: 15px;">
                                                <!-- 基本信息 -->
                                                <div class="field-category">
                                                    <div class="category-header">
                                                        <h5
                                                            style="margin: 0 0 10px 0; font-weight: bold; color: #337ab7; border-bottom: 2px solid #337ab7; padding-bottom: 5px;">
                                                            <i class="fa fa-user"></i> 基本信息
                                                        </h5>
                                                    </div>
                                                    <div class="category-content"
                                                        style="padding: 10px; background: #f9f9f9; border-left: 3px solid #337ab7; margin-bottom: 15px;">
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="name" disabled checked> 姓名
                                                            <input type="hidden" name="row[required_fields][]"
                                                                value="name">
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="gender" disabled checked> 性别
                                                            <input type="hidden" name="row[required_fields][]"
                                                                value="gender">
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="nation" {if in_array('nation',
                                                                $required_fields)}checked{/if}> 民族
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="id_card" disabled checked> 身份证号
                                                            {if in_array('id_card', $required_fields)}
                                                            <input type="hidden" name="row[required_fields][]"
                                                                value="id_card">
                                                            {/if}
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="birth_date" {if in_array('birth_date',
                                                                $required_fields)}checked{/if}> 出生日期
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="birthplace" {if in_array('birthplace',
                                                                $required_fields)}checked{/if}> 籍贯
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="political_status" {if
                                                                in_array('political_status',
                                                                $required_fields)}checked{/if}> 政治面貌
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="education" {if in_array('education',
                                                                $required_fields)}checked{/if}> 文化程度
                                                        </label>
                                                    </div>
                                                </div>

                                                <!-- 联系信息 -->
                                                <div class="field-category">
                                                    <div class="category-header">
                                                        <h5
                                                            style="margin: 0 0 10px 0; font-weight: bold; color: #5cb85c; border-bottom: 2px solid #5cb85c; padding-bottom: 5px;">
                                                            <i class="fa fa-phone"></i> 联系信息
                                                        </h5>
                                                    </div>
                                                    <div class="category-content"
                                                        style="padding: 10px; background: #f9f9f9; border-left: 3px solid #5cb85c; margin-bottom: 15px;">
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="phone" disabled checked> 手机号
                                                            <input type="hidden" name="row[required_fields][]"
                                                                value="phone">
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="contact_phone" {if in_array('contact_phone',
                                                                $required_fields)}checked{/if}> 其他联系电话
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="email" {if in_array('email',
                                                                $required_fields)}checked{/if}> 邮箱
                                                        </label>

                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="address" disabled checked> 现住址
                                                            <input type="hidden" name="row[required_fields][]"
                                                                value="address">
                                                        </label>
                                                    </div>
                                                </div>

                                                <!-- 家庭联系人 -->
                                                <div class="field-category">
                                                    <div class="category-header">
                                                        <h5
                                                            style="margin: 0 0 10px 0; font-weight: bold; color: #f0ad4e; border-bottom: 2px solid #f0ad4e; padding-bottom: 5px;">
                                                            <i class="fa fa-users"></i> 家庭联系人
                                                        </h5>
                                                    </div>
                                                    <div class="category-content"
                                                        style="padding: 10px; background: #f9f9f9; border-left: 3px solid #f0ad4e; margin-bottom: 15px;">
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="family_contact_name" disabled checked> 家庭联系人姓名
                                                            <input type="hidden" name="row[required_fields][]"
                                                                value="family_contact_name">
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="family_contact_relation" disabled checked>
                                                            家庭联系人关系
                                                            <input type="hidden" name="row[required_fields][]"
                                                                value="family_contact_relation">
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="family_contact_phone" disabled checked> 家庭联系人电话
                                                            <input type="hidden" name="row[required_fields][]"
                                                                value="family_contact_phone">
                                                        </label>
                                                    </div>
                                                </div>

                                                <!-- 工作信息 -->
                                                <div class="field-category">
                                                    <div class="category-header">
                                                        <h5
                                                            style="margin: 0 0 10px 0; font-weight: bold; color: #5bc0de; border-bottom: 2px solid #5bc0de; padding-bottom: 5px;">
                                                            <i class="fa fa-briefcase"></i> 工作信息
                                                        </h5>
                                                    </div>
                                                    <div class="category-content"
                                                        style="padding: 10px; background: #f9f9f9; border-left: 3px solid #5bc0de; margin-bottom: 15px;">
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="former_work_unit" {if
                                                                in_array('former_work_unit',
                                                                $required_fields)}checked{/if}> 原工作单位
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="former_unit_type" {if
                                                                in_array('former_unit_type',
                                                                $required_fields)}checked{/if}> 原单位类型
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="former_position" {if in_array('former_position',
                                                                $required_fields)}checked{/if}> 原职务
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="job_level" {if in_array('job_level',
                                                                $required_fields)}checked{/if}> 职级
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="professional_title" {if
                                                                in_array('professional_title',
                                                                $required_fields)}checked{/if}> 职称
                                                        </label>
                                                    </div>
                                                </div>

                                                <!-- 其他信息 -->
                                                <div class="field-category">
                                                    <div class="category-header">
                                                        <h5
                                                            style="margin: 0 0 10px 0; font-weight: bold; color: #d9534f; border-bottom: 2px solid #d9534f; padding-bottom: 5px;">
                                                            <i class="fa fa-info-circle"></i> 其他信息
                                                        </h5>
                                                    </div>
                                                    <div class="category-content"
                                                        style="padding: 10px; background: #f9f9f9; border-left: 3px solid #d9534f; margin-bottom: 15px;">
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="specialty" {if in_array('specialty',
                                                                $required_fields)}checked{/if}> 特长
                                                        </label>
                                                        <label class="checkbox-inline" style="margin-right: 15px;">
                                                            <input type="checkbox" name="row[required_fields][]"
                                                                value="medical_history" {if in_array('medical_history',
                                                                $required_fields)}checked{/if}> 疾病史
                                                        </label>
                                                    </div>
                                                </div>

                                                <div class="help-block"
                                                    style="margin-top: 10px; padding: 10px; background: #dff0d8; border: 1px solid #d6e9c6; border-radius: 4px;">
                                                    <i class="fa fa-info-circle text-info"></i>
                                                    <small
                                                        class="text-muted">选择用户报名时必须填写的字段，未选择的字段为可选填写。建议根据报名项目的特点选择相应的必填字段。</small>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 手签板设置 -->
                <div class="form-group">
                    <label for="c-enable_signature_pad" class="control-label col-xs-12 col-sm-2">手签板:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_signature_pad">
                        <input id="c-enable_signature_pad" name="row[enable_signature_pad]" type="hidden"
                            value="{$row.enable_signature_pad|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.enable_signature_pad == 1}active{else}text-gray{/if}"
                                data-input-id="c-enable_signature_pad" data-yes="1" data-no="0">
                                <i
                                    class="fa fa-toggle-on text-success fa-2x {if $row.enable_signature_pad != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="signature-pad-settings"
                    style="display: {if $row['enable_signature_pad']=='1'}block{else}none{/if};">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">手签板设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">主题:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" name="row[signature_title]" class="form-control"
                                            value="{$row.signature_title|default='青秀区老年大学学习活动安全承诺书'}"
                                            placeholder="请输入承诺书主题" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">正文:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <textarea name="row[signature_content]" class="form-control editor" rows="8"
                                            placeholder="请输入承诺书正文内容">{$row.signature_content|default='本人身体健康状况良好，自愿参加青秀区老年大学的学习和活动；自愿参加上级部门、学校、学校群团组织（临时党支部、学委会、艺术团、老文体协会等）和班级组织开展的各项活动，包括各种培训（讲座）、各种比赛、各种演出（展演）、各种交流、各种志愿活动等。学习、活动期间，本人将根据自身身体状况，独立判断行动风险，以保障自身人身安全，并有权暂停参加活动。若因自身疾病、身体、行为（行动）等原因发生意外事件或安全事故，或不可抗力等原因所造成的后果，组织者和其他参与者不承担责任，后果一律由本人和家属（担保人）承担责任，学校不负任何经济责任或连带责任。特此承诺。'}</textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">落款样式:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <textarea name="row[signature_footer]" class="form-control editor" rows="6"
                                            placeholder="请输入落款样式内容">{$row.signature_footer|default='承诺人姓名：
承诺人身份证号：
承诺人签名：

年满70及以上人员家属（担保人）姓名：
家属（担保人）身份证号：
家属（担保人）联系方式：
家属（担保人）与本人关系：
家属（担保人）签名：'}</textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 事项设置 -->
                <div class="form-group">
                    <label for="c-enable_matters_setting" class="control-label col-xs-12 col-sm-2">事项设置:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_matters_setting">
                        <input id="c-enable_matters_setting" name="row[enable_matters_setting]" type="hidden"
                            value="{$row.enable_matters_setting|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.enable_matters_setting == 1}active{else}text-gray{/if}"
                                data-input-id="c-enable_matters_setting" data-yes="1" data-no="0">
                                <i
                                    class="fa fa-toggle-on text-success fa-2x {if $row.enable_matters_setting != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="matters-settings"
                    style="display: {if $row['enable_matters_setting']=='1'}block{else}none{/if};">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">事项设置</h3>
                            </div>
                            <div class="panel-body">
                                <!-- 导课模式选项卡 -->
                                <ul class="nav nav-tabs" role="tablist">
                                    <li role="presentation" class="active">
                                        <a href="#auto-import-edit" aria-controls="auto-import-edit" role="tab"
                                            data-toggle="tab">全自动导入</a>
                                    </li>
                                    <li role="presentation">
                                        <a href="#table-import-edit" aria-controls="table-import-edit" role="tab"
                                            data-toggle="tab">定义表格导入</a>
                                    </li>
                                    <li role="presentation">
                                        <a href="#class-import-edit" aria-controls="class-import-edit" role="tab"
                                            data-toggle="tab">班级导入</a>
                                    </li>
                                    <li role="presentation">
                                        <a href="#manual-setting-edit" aria-controls="manual-setting-edit" role="tab"
                                            data-toggle="tab">手动设置</a>
                                    </li>
                                </ul>

                                <!-- 选项卡内容 -->
                                <div class="tab-content" style="margin-top: 15px;">
                                    <!-- 全自动导入 -->
                                    <div role="tabpanel" class="tab-pane active" id="auto-import-edit">

                                    </div>

                                    <!-- 定义表格导入 -->
                                    <div role="tabpanel" class="tab-pane" id="table-import-edit">
                                        <div class="form-group">
                                            <label class="control-label col-xs-12 col-sm-3">课程表excel表格导入:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <input type="file" name="course_excel_file" class="form-control"
                                                    accept=".xlsx,.xls" placeholder="请选择Excel文件" />
                                                <input type="hidden" name="row[course_excel_path]"
                                                    value="{$row.course_excel_path|default=''}" />
                                                {if !empty($row.course_excel_path)}
                                                <div class="help-block">
                                                    <small class="text-success">当前文件：{$row.course_excel_path}</small>
                                                </div>
                                                {/if}
                                                <div class="help-block">
                                                    <small class="text-muted">支持.xlsx和.xls格式的Excel文件</small>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <!-- 班级导入 -->
                                    <div role="tabpanel" class="tab-pane" id="class-import-edit">
                                        <!-- 加载指示器 -->
                                        <div id="loading-indicator"
                                            style="text-align: center; padding: 20px; display: none;">
                                            <i class="fa fa-spinner fa-spin fa-2x"></i>
                                            <p>正在加载班级数据...</p>
                                        </div>

                                        <!-- 动态班级数据容器 -->
                                        <div id="class-items-container">
                                            <!-- 班级数据将通过ajax动态加载到这里 -->
                                        </div>

                                        <div class="form-group">
                                            <button type="button" class="btn btn-success btn-sm"
                                                id="add-class-item-edit">添加班级项目</button>
                                        </div>
                                    </div>

                                    <!-- 手动设置 -->
                                    <div role="tabpanel" class="tab-pane" id="manual-setting-edit">
                                        <div class="alert alert-info">
                                            <i class="fa fa-info-circle"></i>
                                            手动设置功能正在开发中，敬请期待...
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 线下报名设置 -->
                <div class="form-group">
                    <label for="c-enable_offline_registration" class="control-label col-xs-12 col-sm-2">线下报名:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_offline_registration">
                        <input id="c-enable_offline_registration" name="row[enable_offline_registration]" type="hidden"
                            value="{$row.enable_offline_registration|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.enable_offline_registration == 1}active{else}text-gray{/if}"
                                data-input-id="c-enable_offline_registration" data-yes="1" data-no="0">
                                <i
                                    class="fa fa-toggle-on text-success fa-2x {if $row.enable_offline_registration != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="offline-registration-settings"
                    style="display: {if $row['enable_offline_registration']=='1'}block{else}none{/if};">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">线下报名设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label for="c-offline_quota"
                                        class="control-label col-xs-12 col-sm-3">线下名额数量:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input id="c-offline_quota" name="row[offline_quota]" type="number"
                                            class="form-control" value="{$row.offline_quota|htmlentities}" min="0">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="c-offline_payment_time_limit"
                                        class="control-label col-xs-12 col-sm-3">线下报名缴费时间限制:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="input-group">
                                            <input id="c-offline_payment_time_limit"
                                                name="row[offline_payment_time_limit]" type="number"
                                                class="form-control"
                                                value="{$row.offline_payment_time_limit|htmlentities}" min="1"
                                                max="168">
                                            <div class="input-group-addon">小时</div>
                                        </div>
                                        <span class="help-block">设置线下报名后需要在多少小时内完成缴费，超时将自动取消报名</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>




                <div class="form-group">
                    <label for="c-intro" class="control-label col-xs-12 col-sm-2">课程介绍 :</label>
                    <div class="col-xs-12 col-sm-8" id="div-intro">
                        <textarea name="row[intro]" id="c-intro" class="form-control editor" data-rule="" rows="5"
                            data-tip="课程介绍 ">{$row.intro}</textarea>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-cover" class="control-label col-xs-12 col-sm-2">封面 :</label>
                    <div class="col-xs-12 col-sm-8" id="div-cover">
                        <div class="form-inline">
                            <input id="c-cover" class="form-control" size="37" name="row[cover]" type="text"
                                value="{$row.cover}" data-tip="">
                            <span><button type="button" id="plupload-cover" class="btn btn-danger plupload"
                                    data-input-id="c-cover" data-mimetype="image/*" data-multiple="false"
                                    data-preview-id="p-cover"><i class="fa fa-upload"></i>
                                    {:__("Upload")}</button></span>
                            <span><button type="button" id="fachoose-cover" class="btn btn-primary fachoose"
                                    data-input-id="c-cover" data-mimetype="image/*" data-multiple="false"><i
                                        class="fa fa-list"></i> {:__("Choose")}</button></span>
                            <ul class="row list-inline plupload-preview" id="p-cover"></ul>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-amount" class="control-label col-xs-12 col-sm-2">学费 :</label>
                    <div class="col-xs-12 col-sm-8" id="div-amount">
                        <div class="form-inline">
                            <input id="c-amount" class="form-control" size="37" name="row[amount]" type="text"
                                value="{$row.amount}" data-tip="">
                            <ul class="row list-inline plupload-preview" id="p-amount"></ul>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-start_time" class="control-label col-xs-12 col-sm-2">开始时间:</label>
                    <div class="col-xs-12 col-sm-8" id="div-start_time">
                        <input type="text" id="c-start_time" name="row[start_time]" value="{$row.start_time}"
                            class="form-control datetimepicker" data-use-current="true"
                            data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="开始时间" data-rule="" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-end_time" class="control-label col-xs-12 col-sm-2">结束时间 :</label>
                    <div class="col-xs-12 col-sm-8" id="div-end_time">
                        <input type="text" id="c-end_time" name="row[end_time]" value="{$row.end_time}"
                            class="form-control datetimepicker" data-use-current="true"
                            data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="结束时间 " data-rule="" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-max_num" class="control-label col-xs-12 col-sm-2">招生人数限制:</label>
                    <div class="col-xs-12 col-sm-8" id="div-max_num">
                        <input type="number" id="c-max_num" name="row[max_num]" value="{$row.max_num|default='0'}"
                            class="form-control" title="max_num" data-rule="integer" placeholder="只能填入整数"
                            data-tip="招生人数" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_use_integral" class="control-label col-xs-12 col-sm-2">是否允许积分兑换:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_use_integral">
                        <input id="c-is_use_integral" name="row[is_use_integral]" type="hidden"
                            value="{$row.is_use_integral|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.is_use_integral == 1}active{else}text-gray{/if}"
                                data-input-id="c-is_use_integral" data-yes="1" data-no="0">
                                <i
                                    class="fa fa-toggle-on fa-2x {if $row.is_use_integral != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">允许</div>
                                <div data-favisible="switch=0" class="text-gray">不允许</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_real" class="control-label col-xs-12 col-sm-2">是否正式报名:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_real">
                        <input id="c-is_real" name="row[is_real]" type="hidden" value="{$row.is_real|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.is_real == 1}active{else}text-gray{/if}"
                                data-input-id="c-is_real" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-2x {if $row.is_real != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-primary">正式报名</div>
                                <div data-favisible="switch=0" class="text-gray">非正式报名</div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 状态字段 -->
                <div class="form-group">
                    <label for="c-status" class="control-label col-xs-12 col-sm-2">状态:</label>
                    <div class="col-xs-12 col-sm-8" id="div-status">
                        <input id="c-status" name="row[status]" type="hidden" value="{$row.status|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.status=='1'}active{else}text-gray{/if}"
                                data-input-id="c-status" data-yes="1" data-no="0">
                                <i
                                    class="fa fa-toggle-on text-success fa-2x {if $row.status!='1'}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">已开启</div>
                                <div data-favisible="switch=0" class="text-gray">未开启</div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 是否关闭字段 -->
                <div class="form-group">
                    <label for="c-is_close" class="control-label col-xs-12 col-sm-2">是否关闭:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_close">
                        <input id="c-is_close" name="row[is_close]" type="hidden" value="{$row.is_close|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.is_close=='1'}active{else}text-gray{/if}"
                                data-input-id="c-is_close" data-yes="1" data-no="0">
                                <i
                                    class="fa fa-toggle-on text-success fa-2x {if $row.is_close!='1'}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-danger">已关闭</div>
                                <div data-favisible="switch=0" class="text-gray">未关闭</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_opened" class="control-label col-xs-12 col-sm-2">是否开启过:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_opened">
                        <input id="c-is_opened" name="row[is_opened]" type="hidden" value="{$row.is_opened|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.is_opened == 1}active{else}text-gray{/if}"
                                data-input-id="c-is_opened" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-2x {if $row.is_opened != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-info">已开启过</div>
                                <div data-favisible="switch=0" class="text-gray">未开启过</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_finished" class="control-label col-xs-12 col-sm-2">是否结束:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_finished">
                        <input id="c-is_finished" name="row[is_finished]" type="hidden"
                            value="{$row.is_finished|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.is_finished == 1}active{else}text-gray{/if}"
                                data-input-id="c-is_finished" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-2x {if $row.is_finished != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-warning">已结束</div>
                                <div data-favisible="switch=0" class="text-gray">未结束</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_user_end" class="control-label col-xs-12 col-sm-2">是否手动截止:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_user_end">
                        <input id="c-is_user_end" name="row[is_user_end]" type="hidden"
                            value="{$row.is_user_end|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.is_user_end == 1}active{else}text-gray{/if}"
                                data-input-id="c-is_user_end" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-2x {if $row.is_user_end != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-warning">手动截止</div>
                                <div data-favisible="switch=0" class="text-gray">未手动截止</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-is_end" class="control-label col-xs-12 col-sm-2">是否截止:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_end">
                        <input id="c-is_end" name="row[is_end]" type="hidden" value="{$row.is_end|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.is_end == 1}active{else}text-gray{/if}"
                                data-input-id="c-is_end" data-yes="1" data-no="0">
                                <i class="fa fa-toggle-on fa-2x {if $row.is_end != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-danger">已截止</div>
                                <div data-favisible="switch=0" class="text-gray">未截止</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-dead_time" class="control-label col-xs-12 col-sm-2">截止时间 :</label>
                    <div class="col-xs-12 col-sm-8" id="div-dead_time">
                        <input type="text" id="c-dead_time" name="row[dead_time]" value="{$row.dead_time}"
                            class="form-control datetimepicker" data-use-current="true"
                            data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="截止时间 " data-rule="" />
                    </div>
                </div>

                <!-- 特殊报名通道设置 -->
                <div class="form-group">
                    <label for="c-enable_special_channel" class="control-label col-xs-12 col-sm-2">特殊报名通道:</label>
                    <div class="col-xs-12 col-sm-8" id="div-enable_special_channel">
                        <input id="c-enable_special_channel" name="row[enable_special_channel]" type="hidden"
                            value="{$row.enable_special_channel|default=0}">
                        <div style="display: flex; align-items: center;">
                            <a href="javascript:;" data-toggle="switcher"
                                class="btn-switcher {if $row.enable_special_channel == 1}active{else}text-gray{/if}"
                                data-input-id="c-enable_special_channel" data-yes="1" data-no="0">
                                <i
                                    class="fa fa-toggle-on text-success fa-2x {if $row.enable_special_channel != 1}fa-flip-horizontal{/if}"></i>
                            </a>
                            <div style="margin-left: 10px;">
                                <div data-favisible="switch=1" class="text-success">开启</div>
                                <div data-favisible="switch=0" class="text-gray">关闭</div>
                            </div>
                        </div>
                        <div class="help-block">
                            <small class="text-muted">开启后,指定手机号可在截止时间后继续报名</small>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="special-channel-settings"
                    style="display: {if $row['enable_special_channel']=='1'}block{else}none{/if};">
                    <div class="col-xs-10 offset-xs-2 col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">特殊报名通道设置</h3>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">适用范围:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <select name="row[special_channel_scope]" id="c-special_channel_scope"
                                            class="form-control">
                                            <option value="all" {if $row['special_channel_scope']=='all' ||
                                                empty($row['special_channel_scope'])}selected{/if}>所有课程</option>
                                            <option value="specific" {if $row['special_channel_scope']=='specific'
                                                }selected{/if}>指定课程</option>
                                        </select>
                                        <div class="help-block">
                                            <small class="text-muted">选择白名单用户可以报名的课程范围</small>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group" id="specific-classes-group"
                                    style="display: {if $row['special_channel_scope']=='specific'}block{else}none{/if};">
                                    <label class="control-label col-xs-12 col-sm-3">指定课程:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <select name="row[special_channel_classes][]" id="c-classes_id"  multiple data-live-search="true" class="form-control">
                                        </select>
                                        <div class="help-block">
                                            <small class="text-muted">选择白名单用户可以报名的具体课程(可多选)</small>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-3">手机号白名单:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <textarea name="row[special_channel_phones]" id="c-special_channel_phones"
                                            class="form-control" rows="6"
                                            placeholder="请输入手机号,每行一个&#10;例如:&#10;13800138000&#10;13900139000">{$row.special_channel_phones|default=''}</textarea>
                                        <div class="help-block">
                                            <small class="text-muted">每行输入一个手机号,这些手机号可在截止时间后继续报名</small>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>


                <div class="form-group layer-footer">
                    <label class="control-label col-xs-12 col-sm-2"></label>
                    <div class="col-xs-12 col-sm-8">
                        <button type="submit" class="btn btn-success btn-embossed disabled">{:__("OK")}</button>
                        <button type="reset" class="btn btn-default btn-embossed">{:__("Reset")}</button>
                    </div>
                </div>
            </div>

            <!-- 项目详情 -->
            <div role="tabpanel" class="tab-pane fade" id="project-detail">
                <!-- 项目详情内容 -->
                <div id="info-container">
                    <div class="info-item">
                        事项名称: <span id="item-name-display"></span>
                    </div>
                    <div class="info-item">
                        ID: <span id="item-id-display"></span>
                    </div>
                    <div class="info-item">
                        说明: <span id="description-display"></span>
                    </div>
                    <div class="info-item">
                        预报名开始时间: <span id="pre-start-time-display"></span>
                    </div>
                    <div class="info-item">
                        预报名结束时间: <span id="pre-end-time-display"></span>
                    </div>
                    <div class="info-item">
                        预报名数量限制: <span id="pre-registration-limit-display"></span>
                    </div>
                </div>
            </div>

            <!-- 班级情况 -->
            <div role="tabpanel" class="tab-pane fade" id="class-info">
                <!-- 班级情况内容 -->
                <div id="class-list"></div>
            </div>

            <!-- 报名学员详情 -->
            <div role="tabpanel" class="tab-pane fade" id="student-detail">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">报名学员列表</h3>
                    </div>
                    <div class="panel-body">
                        <div class="table-responsive">
                            <table class="table table-striped table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>账号名称</th>
                                        <th>手机号</th>
                                        <th>性别</th>
                                        <th>报名课程</th>
                                        <th>报名时间</th>
                                        <th>应缴金额</th>
                                        <th>缴费情况</th>
                                        <th>缴费时间</th>
                                        <th>缴费订单号</th>
                                    </tr>
                                </thead>
                                <tbody id="student-list">
                                    <tr>
                                        <td colspan="8" class="text-center">点击上方标签加载数据...</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 报名情况 -->
            <div role="tabpanel" class="tab-pane fade" id="registration-info">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">报名情况列表</h3>
                    </div>
                    <div class="panel-body">
                        <div class="table-responsive">
                            <table class="table table-striped table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>账号名称</th>
                                        <th>报名课程</th>
                                        <th>报名时间</th>
                                        <th>应缴金额</th>
                                        <th>缴费情况</th>
                                        <th>缴费时间</th>
                                        <th>缴费订单号</th>
                                    </tr>
                                </thead>
                                <tbody id="registration-list">
                                    <tr>
                                        <td colspan="8" class="text-center">点击上方标签加载数据...</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 报名情况汇总 -->
            <div role="tabpanel" class="tab-pane fade" id="registration-summary">
                <!-- 报名情况汇总内容 -->
            </div>
        </div>
    </div>
</form>